package com.authorization.project.authorization.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.authorization.framework.aspectj.lang.annotation.Excel;
import com.authorization.framework.web.domain.BaseEntity;

import java.util.ArrayList;
import java.util.List;

/**
 * 模块对象 module
 * 
 * @author 李晓雷
 * @date 2020-04-22
 */
public class Module extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 名称 */
    @Excel(name = "名称")
    private String name;

    /** 英文名称 */
    @Excel(name = "英文名称")
    private String english;

    /** 父级ID */
    @Excel(name = "父级ID")
    private Long parentId;

    /** 是否为基本模块(1TRUE,0 FALSE) */
    @Excel(name = "是否为基本模块(1TRUE,0 FALSE)")
    private String baseState;

    /** 排序 */
    @Excel(name = "排序")
    private Integer sort;

    /** 产品主键 */
    @Excel(name = "产品主键")
    private Long productId;

    /**----------传值--------**/

    /** 产品名称 */
    @Excel(name = "产品名称")
    private String productName;

    /** 套餐主键 */
    private Long packageId;

    /** 模块分类 */
    private String parentName;

    /**微服务集合**/
    private List<Long> serviceIdsList;

    /** 模块集合 */
    private List<Module> moduleList;

    /** 模块选中状态 */
    private  String checked;

    public String getEnglish() {
        return english;
    }

    public void setEnglish(String english) {
        this.english = english;
    }

    public String getChecked() {
        return checked;
    }

    public void setChecked(String checked) {
        this.checked = checked;
    }

    public List<Module> getModuleList() {
        return moduleList;
    }

    public void setModuleList(List<Module> moduleList) {
        this.moduleList = moduleList;
    }

    public List<Long> getServiceIdsList() {
        return serviceIdsList;
    }

    public void setServiceIdsList(List<Long> serviceIdsList) {
        this.serviceIdsList = serviceIdsList;
    }

    public String getParentName() {
        return parentName;
    }

    public void setParentName(String parentName) {
        this.parentName = parentName;
    }

    public Long getPackageId() {
        return packageId;
    }

    public void setPackageId(Long packageId) {
        this.packageId = packageId;
    }

    /** 子菜单 */
    private List<Module> children = new ArrayList<Module>();

    public List<Module> getChildren() {
        return children;
    }

    public void setChildren(List<Module> children) {
        this.children = children;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }
    public void setParentId(Long parentId) 
    {
        this.parentId = parentId;
    }

    public Long getParentId() 
    {
        return parentId;
    }
    public void setBaseState(String baseState)
    {
        this.baseState = baseState;
    }

    public String getBaseState()
    {
        return baseState;
    }
    public void setSort(Integer sort) 
    {
        this.sort = sort;
    }

    public Integer getSort() 
    {
        return sort;
    }
    public void setProductId(Long productId) 
    {
        this.productId = productId;
    }

    public Long getProductId() 
    {
        return productId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("name", getName())
            .append("parentId", getParentId())
            .append("baseState", getBaseState())
            .append("sort", getSort())
            .append("productId", getProductId())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
